<html>
<body>
Reports suspicious calls to <code>Collection.toArray()</code>.
<p>The following types of calls are considered suspicious:</p>
<ul>
  <li>
    when the type of the array
    argument is not the same as the array type to which the result is casted.
  </li>
  <li>
    when the type of the array argument does not match the type parameter in the collection declaration.
  </li>
</ul>
<p><b>Example:</b></p>
<pre><code>
void m1(List list) {
  Number[] ns = (Number[]) list.toArray(new String[0]);
}

void m2(List&lt;Number&gt; list) {
  Number[] ns = list.toArray(new String[0]);
}
</code></pre>


</body>
</html>